[asp.net-mvc] Html.DropDownList FindByValue in an Edit view?
Posted
by Pandiya Chendur
on Stack Overflow
See other posts from Stack Overflow
or by Pandiya Chendur
Published on 2010-05-04T04:38:38Z
Indexed on
2010/05/04
4:48 UTC
Read the original article
Hit count: 174
I have an edit page with a Html.DropDownList in it.... I place the value in textbox but i cant show the dropdownlist value it always shows up with Select
... Any suggestion how it can be done...
<p>
<label for="Mat_Name">Mat_Name:</label>
<%= Html.TextBox("Mat_Name", Model.Mat_Name) %>
<%= Html.ValidationMessage("Mat_Name", "*") %>
</p>
<p>
<label for="MeasurementTypeId">MeasurementType:</label>
<%= Html.DropDownList("MeasurementType", "Select")%>
<%= Html.ValidationMessage("MeasurementTypeId", "*") %>
</p>
© Stack Overflow or respective owner